package com.spring.boot.demo.controller;

import com.spring.boot.demo.mapper.UserMapper;
import com.spring.boot.demo.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ZhuYouBin
 * @version 1.0.0
 * @Date: 2022/10/23 18:45
 * @Description
 */
@RestController
@RequestMapping("/api")
public class TestController {

    @Autowired
    private UserMapper userMapper;

    @GetMapping("/mybatis")
    public List<User> query() {
        List<User> list = userMapper.queryList();
        return list;
    }

}
